package com.example.friend.domain;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class Solution {
    public int twoSum(int a, int b) {
        return a + b;
    }

    private List<String> inputList = new ArrayList<>();

    private List<String> outputList = new ArrayList<>();
    private String userCode;

    public static void main(String[] args) throws JsonProcessingException {
        ObjectMapper objectMapper = new ObjectMapper();
        Solution solution = new Solution();
        solution.getInputList().add("1 2");
        solution.getInputList().add("1 3");
        solution.getOutputList().add("3");
        solution.getOutputList().add("4");
        solution.setUserCode("\"public class Solution {\\n\" +\n" +
                "                \"    public int twoSum(int a, int b) {\\n\" +\n" +
                "                \"        return a + b;\\n\" +\n" +
                "                \"    }\\n\" +\n" +
                "                \"    \\n\" +\n" +
                "                \"}\"");
        String s = objectMapper.writeValueAsString(solution);
        System.out.println(s);

    }


}
